package ${packagePath};

import com.ibp.core.mapper.BaseDAO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
<#list imports as import>
import ${import};
</#list>
import java.util.List;

/**
 * ${comment}
 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
 * @author ${author}
 */
@Mapper
public interface ${simpleName} extends BaseDAO {

<#list model.fields as field>
    <#if field.id>
    /**
     * 通过ID查询单个${model.comment}
     *
     * @param ${field.name} ${field.comment}
     * @return {@link ${model.simpleName}}
     */
     ${model.simpleName} findById(@Param("${field.name}") ${field.typeSimpleName} ${field.name});

    /**
     * 新增${model.comment}
     *
     * @param ${model.varName} ${model.comment}
     */
    void insert(${model.simpleName} ${model.varName});

    /**
     * 修改${model.comment}
     *
     * @param ${field.name} ${field.comment}
     * @param ${model.varName} ${model.comment}
     */
    void update(${field.typeSimpleName} ${field.name}, ${model.simpleName} ${model.varName});

    /**
     * 通过ID删除单个${model.comment}
     *
     * @param ${field.name} ${field.comment}
     */
    void deleteById(${field.typeSimpleName} ${field.name});

    </#if>
</#list>
    /**
     * 查询${model.comment}数据列表
     *
     * @param ${model.varName} ${model.comment}
     * @return 数据列表
     */
     List<${model.simpleName}> findList(${model.simpleName} ${model.varName});

    /**
     * 查询${model.comment}数据条数
     *
     * @param ${model.varName} ${model.comment}
     * @return 数据条数
     */
     int findCount(${model.simpleName} ${model.varName});

    /**
     * 分页查询${model.comment}数据列表
     *
     * @param ${model.varName} ${model.comment}
     * @return 数据列表
     */
     List<${model.simpleName}> findPageList(${model.simpleName} ${model.varName});

}